//
//  ImgViewModel.swift
//  SwiftDemo
//
//  Created by 硕星 on 2019/4/22.
//  Copyright © 2019 ty. All rights reserved.
//

import Foundation
import Moya
import ObjectMapper
import RxSwift

class ImgViewModel {
    func showImages() -> Observable<BannerInfo> {
        return netApi.rx.requestWithProgress(.Banners)
            .filterCompleted()
            .mapJSON()
            .mapObject(type: BannerInfo.self)
    }
}

